tools/ocaml: abi check: Cope with consecutive relevant enums
authorIan Jackson <ian.jackson@eu.citrix.com>
Wed, 25 Sep 2019 14:14:21 +0000 (16:14 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 25 Sep 2019 14:14:21 +0000 (16:14 +0200)
commit8d8db5a4ad267bca663bc1e41dccb53e072d73d2
treeb9e7c07ee2949d8b6d2fefb90a5caa5d19af6572
parent80ff3d338dc93260b41ffeeebb0f852c2edef9ce
tools/ocaml: abi check: Cope with consecutive relevant enums

If the end of one enum is the `type' line for the next enum, we would
not notice it.

Fix this by reordering the code, and getting rid of the else: now if
the "we are within an enum" branch decides that it's the end of the
enum, it unsets $ei and we then immediately process the line as a "not
within an enum" line - ie as the start of the next one.

Reported-by: Paul Durrant <paul.durrant@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Acked-by: Christian Lindig <christian.lindig@citrix.com>
tools/ocaml/libs/xc/abi-check